home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
tifreadr.sit
/
Tiff Window DEMO
/
my color.h
< prev
next >
Wrap
Text File
|
1990-04-23
|
3KB
|
112 lines
#include <mactypes.h>
#include <color.h>
#include <colortoolbox.h>
#include <Quickdraw.h>
#include <FontMgr.h>
#include <EventMgr.h>
#include <ControlMgr.h>
#include <WindowMgr.h>
#include <MenuMgr.h>
#include <TextEdit.h>
#include <DialogMgr.h>
#include <DeskMgr.h>
#include <ToolboxUtil.h>
#include <ScrapMgr.h>
/*==================================================================*/
/* Defines Added To Make Compatible With LightSpeed C */
/*==================================================================*/
#define NULL 0L /* The value of a pointer pointing to nothing */
#define nil NULL /* Define constant NIL to equal the C NULL pointer */
/* to retain Pascal calling conventions */
/* of "Inside Mac" documentation */
/*==================================================================*/
/*resource IDs/menu IDs for Apple, File and Edit menus*/
#define appleID 128
#define fileID 129
#define editID 130
#define colorID 131
#define controlID 132
/*index for each menu in myMenus (array of menu handles, 0-based in C!!!!)*/
#define appleM 0
#define fileM 1
#define editM 2
#define colorM 3
#define CcolorM 4
/*total number of menus*/
#define menuCount 5
/*item in Apple menu*/
#define aboutItem 1
/*Items in Edit menu*/
#define undoItem 1
#define cutItem 3
#define copyItem 4
#define pasteItem 5
#define clearItem 6
/*items in File menu*/
#define newItem 1
#define closeItem 3
#define quitItem 5
/* items in the color menu */
#define CONTENT 1
#define FRAME 2
#define TEXT 3
#define HILITE 4
#define TITLE 5
/* items in the Color Control Menu */
#define cFRAME 1
#define cBODY 2
#define cTEXT 3
#define cTHUMB 4
/*default name for windows */
#define WindName "Empty Window "
/*distance to move for new windows*/
#define windDX 25
#define windDY 25
/*initial dimensions of window*/
#define leftEdge 10
#define topEdge 42
#define rightEdge 310
#define botEdge 275
#define ABOUT_BOX 1000
#define ONE_PIXEL 0
#define BAR_WIDTH 15
#define HORIZONTAL_SCROLL 10
#define VERTICLE_SCROLL 20
extern MenuHandle myMenus[menuCount]; /*handles to the menus*/
extern Rect dragRect; /*rectangle used to mark boundaries for dragging window*/
extern Rect screenRect; /*to hold screenbits.bounds */
extern Rect txRect; /*rectangle for text in application window*/
extern TEHandle textH; /*handle to Textedit record*/
extern Boolean extendedCH; /*true if user is Shift-clicking*/
extern Boolean doneFlag; /*true if user has chosen Quit Item*/
extern EventRecord myEvent; /*information about an event*/
extern CWindowRecord wRecord; /*information about the application window*/
extern CWindowPtr myWindow; /*pointer to wRecord*/
extern CWindowPeek myWinPeek; /*another pointer to wRecord*/
extern CWindowPtr whichWindow; /*window in which mouse button was pressed*/
extern Rect nextWRect ; /*portRect for next window to be opended*/
extern long nextWNum; /*number of next window (for title)*/
extern CGrafPtr savedPort; /*pointer to preserve GrafPort*/
extern Boolean menusOK; /*for disabling menu items*/
extern long scrapErr;
extern short scrCopyErr;